<template>
  <el-container>
    <el-header>
      <div>
        <breadcrumb>

        </breadcrumb>
      </div>
    </el-header>
    <el-main style="background-color: white ; width: 1100px ; height: 800px; margin: 0 auto">
      <el-card style="padding: 0px ; margin: 0px">

        <el-row style="margin: 0px ; padding: 0px">
          <el-col span="2" style="margin: 0px ; padding: 0px ">
            <p style="margin: 0px; line-height: 40px">帮助标题:</p>
          </el-col>
          <el-col span="8">
            <el-input
              placeholder="请输入关键字"
              v-model="input10"
              clearable>
            </el-input>
          </el-col>
        </el-row>
        <div style="margin-top: 20px"></div>
        <el-row style="margin: 0px ; padding: 0px">
          <el-col span="2" style="margin: 0px ; padding: 0px ">
            <p style="margin: 0px; line-height: 40px">帮助分类:</p>
          </el-col>
          <el-col span="8">
            <template>
              <el-select v-model="value" placeholder="全部">
                <el-option
                  v-for="item in options"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
                </el-option>
              </el-select>
            </template>
          </el-col>
        </el-row>


        <div style="margin-top: 20px"></div>
        <el-row style="margin: 0px ; padding: 0px">
          <el-col span="2" style="margin: 0px ; padding: 0px ">
            <p style="margin: 0px; line-height: 40px">显示设置:</p>
          </el-col>
          <el-col span="8" style="margin-left: 20px; margin-top: 10px">

            <el-switch
              v-model="value2"
              active-color="#13ce66"
              inactive-color="#ff4949">
            </el-switch>

          </el-col>
        </el-row>

        <div style="margin-top: 20px"></div>


        <el-row>

<!--          @selection-change="handleSelectionChange-->
          <el-table v-loading="loading" :data="myOrderList" @selection-change="handleSelectionChange">
            <el-table-column type="selection" width="55" align="center" />
            <el-table-column label="工单编号" width="100" align="center" prop="qtId" />
            <el-table-column label="封面图片" width="100" align="center" prop="qtTitle" />
            <el-table-column label="标题" width="100" align="center" prop="qtTitle" />
            <el-table-column label="分类" align="center" prop="qtType" :show-overflow-tooltip="true" />
            <el-table-column label="是否显示" align="center" prop="roType">

              <template slot-scope="scope">
                <el-switch
                  v-model="value2"
                  active-color="#13ce66"
                  inactive-color="#ff4949">
                </el-switch>
              </template>


            </el-table-column>
            <el-table-column label="发布时间" align="center" prop="createTime" :show-overflow-tooltip="true" />

            <el-table-column label="查看" align="center" prop="10000"></el-table-column>
            <el-table-column label="操作" align="center" class-name="small-padding fixed-width">

              <template slot-scope="scope">
                <router-link to="/dtails">
                  <el-button
                    size="mini"
                    type="text"
                    icon="el-icon-edit"
                    @click="handleUpdate(scope.row)"
                    v-hasPermi="['monitor:job:edit']"
                  >查看</el-button>
                </router-link>
                <el-button
                  size="mini"
                  type="text"
                  icon="el-icon-edit"
                  @click="handleUpdate(scope.row)"
                  v-hasPermi="['monitor:job:edit']"
                >编辑</el-button>
                <el-button
                  size="mini"
                  type="text"
                  icon="el-icon-delete"
                  @click="handleDelete(scope.row)"
                  v-hasPermi="['monitor:job:remove']"
                >删除</el-button>
              </template>
            </el-table-column>
          </el-table>

        </el-row>

        <div style="margin-top: 20px"></div>

        <el-row>

        </el-row>


      </el-card>

      <pagination
        v-show="total>0"
        :total="total"
        :page.sync="queryParams.pageNum"
        :limit.sync="queryParams.pageSize"
        @pagination="getList"
      />
    </el-main>
  </el-container>

</template>

<script>
import breadcrumb from "@/components/Breadcrumb"
import Editor from "@/components/Editor"
import Pagination from '@/components/Pagination'
import {insertOrder} from '@/api/help/helpSand'
export default {

  components: {breadcrumb, Editor, Pagination}


  , data() {
    return {
      value1: this.value2,
      value2: !this.value1,
      input10: '',
      queryParams : {
        pageNum : 1,
        pageSize : 3
      },
      options: [{
        value: '1',
        label: '技术问提'
      }, {
        value: '2',
        label: '传销问题'
      }, {
        value: '3',
        label: '老板不给工资问题'
      }, {
        value: '4',
        label: '心情不好想亚尔哦问题'
      }, {
        value: '5',
        label: 'lol问题'
      }],
      value: '',
      myOrderList : []
    }

  },

  created() {
    this.getfindOrder()
  },
  methods : {
    getfindOrder(){
      insertOrder(this.queryParams).then(response => {
        this.$modal.msgSuccess("查询成功");
        this.myOrderList  = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    }
  }
}

</script>
